import { Directive, DirectiveBinding } from 'vue';

export default <Directive>{
  mounted(el: HTMLElement, binding: DirectiveBinding) {
    el.addEventListener('mouseenter', () => {
      el.style.color = binding.value.color;
    });
    el.addEventListener('mouseleave', () => {
      el.style.color = 'inherit';
    });
  },
};
